package com.wrial.utils;
/*
 * @Author  Wrial
 * @Date Created in 16:51 2020/8/15
 * @Description
 */

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

import java.util.*;

public class Main3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int orderCount = scanner.nextInt();
        int relationCount = scanner.nextInt();
        int[][] arr = new int[relationCount][];
        for (int i = 0; i < relationCount; i++) {
            arr[i][0] = scanner.nextInt();
            arr[i][1] = scanner.nextInt();
        }

        int i = 0, j = 0;
        System.out.println(8);

        Set<Integer> set = new HashSet<>();
        for (Integer integer : set) {
            
        }
    }

    public static int[][] merge(int[][] intervals) {
        if (intervals.length == 0) return intervals;
        Arrays.sort(intervals, (a, b) -> a[0] - b[0]);
        int[] curAns = intervals[0];  //表示一个连续区间
        List<int[]> ans = new ArrayList<>();
        for (int i = 1; i < intervals.length; i++) {
            // 不重合
            if (intervals[i][0] > curAns[1]) {
                ans.add(curAns);
                curAns = intervals[i];
            } else {
                curAns[1] = Math.max(curAns[1], intervals[i][1]);
            }
        }
        //最后一定会剩下一个
        ans.add(curAns);
        int[][] ret = new int[ans.size()][2];
        for (int i = 0; i < ans.size(); i++) {
            System.arraycopy(ans.get(i), 0, ret[i], 0, 2);
        }
        return ret;
    }
}
